export default function (callBack = () => {}) {
	let timer = null

	//监听窗口大小变化，50毫秒防抖
	function resizeHandler () {
	  if (timer) clearTimeout(timer);
	  timer = setTimeout(() => {
		typeof(callBack)==="function"&&callBack(document.body.clientWidth,document.body.clientHeight)
	  }, 50);
	}
	window.addEventListener('resize',function(){
		resizeHandler();
	})
}